<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script  src="my.js"></script>//外嵌js文件
    <script>
        //内嵌js代码
        alert('Hello  World');
    </script>
</head>
<body>
    <input  type="button"  value="点我试试"  onclick="alert('Hello  World')"  />

</body>
</html>